#include<stdio.h>
#include<stdarg.h>
int big_wgc(int size,...)
{
	int i;
	va_list valist;
	int a[size];
	va_start(valist, size);
	for(i = 0; i < size; i++)
	{
		a[i] = va_arg(valist, int);
	}
	va_end(valist);
	for(i = 0; i < size - 1; i++)
	{
		if(a[i] > a[i + 1])
		{
			a[i + 1] = a[i];
		}
	}
	return a[size - 1];
}
int main()
{
	printf("-----------------------------------------------\n");
	printf("7个参数：3,4,3,43,4,34,10\n");
	int num1 = big_wgc(7,3,4,3,43,4,34,10);
	printf("big_wgc测试 = %d    （测试成功）\n",num1);
	printf("-----------------------------------------------\n");
	printf("10个参数：3,4,54,26,34,54,36,365,37,45\n");
	int num2 = big_wgc(10,3,4,54,26,34,54,36,365,37,45);
	printf("big_wgc测试 = %d    （测试成功）\n",num2);
	return 0;
}
